package com.cruise.h5.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
/**
 * <p>
 *
 * </p>
 *
 * @author cruise
 * @since 2021-03-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("b_post_comment")
public class PostComment implements Serializable {
    private static final long serialVersionUID = 1L;

    public PostComment() {
    }

    /**
     * 用于新增评论 构造
     * @param createBy
     * @param updateBy
     */
    public PostComment(String createBy, String updateBy) {
        this.createBy = createBy;
        this.updateBy = updateBy;
    }

    /**
     * 唯一ID
     */
    @TableId(value = "id", type = IdType.UUID)
    private String id;
    /**
     * 父级id(当评论对象，为id 表示 动态的id 或者 跟帖的id)
     */
    @TableField("pid")
    private String pid;
    /**
     * 评论内容
     */
    @TableField("content")
    private String content;
    /**
     * 点赞数
     */
    @TableField("like_count")
    private Integer likeCount = 0 ;
    /**
     * 点踩数
     */
    @TableField("dislike_count")
    private Integer dislikeCount = 0 ;
    /**
     * 回复对象id（userid）
     */
    @TableField("reply_to")
    private String replyTo;

    @TableField("create_by")
    private String createBy;

    @TableField("create_date")
    private Date createDate = new Date();

    @TableField("update_by")
    private String updateBy;

    @TableField("update_date")
    private Date updateDate = new Date();
}

